﻿using System;
using System.Collections;
using System.Collections.Specialized;
using AMS.Core.Entities;
using AMS.WorkBill.Entities;
using VitCode.Castle.DataAccess;
using VitCode.Castle.Helper;

namespace AMS.WorkBill.DataAccess
{
    public class WorkBillAccess : BaseDataAccess
    {

        public AssetState GetEngrossAssetState()
        {
            return GetAssetState("engross");
        }

        public AssetState GetUsedAssetState()
        {
            return GetAssetState("used");
        }

        public AssetState GetIdlenessAssetState()
        {
            return GetAssetState("idleness");
        }

        public AssetState GetAssetState(string aliasValue)
        {
            object objAssetState = GetSingleObjectByProVal(typeof(AssetState).Name, "Alias", aliasValue);
            if (objAssetState != null && objAssetState is AssetState)
                return (AssetState)objAssetState;
            return null;
        }

    }
}